<?php
session_start();
$path = str_replace('images/captcha.php','', __FILE__) ;

header ("Content-type: image/png");
$_img = imagecreatefrompng('fond_verif_img.png');
$arriere_plan = imagecolorallocate($_img, 0, 0, 0);
$avant_plan = imagecolorallocate($_img, 255, 255, 255);

# Generation captcha
require $path. 'core/Captcha.class.php';
$captcha = new Captcha();
$captcha->create();
$nombre = $captcha->nombre;

imagestring($_img, 5, 18, 8, $nombre, $avant_plan);
imagepng($_img);
?>